//
//  CertifiedViewController.m
//  JiJinFinance
//
//  Created by 李东晓 on 15/12/8.
//  Copyright © 2015年 LiDongXiao. All rights reserved.
//

#import "CertifiedViewController.h"
#import "MessageViewController.h"
#import "AutonymViewController.h"
@interface CertifiedViewController ()


@end

@implementation CertifiedViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"实名认证";
    
    _LabelName.text = self.StrName;
    _LabelCard.text = self.StrNumber;
    
    _LabelName.textColor = [UIColor blackColor];
    
    [_LabelAdvice setText:@"未审核"];
    
    [self BackButton];
}



- (IBAction)ButNameClick {
    NSLog(@"姓名");
    //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    if ([_LabelName.text isEqualToString:@""]) {
        
    }
//    else
//    {
//        AutonymViewController * autonym = [[AutonymViewController alloc]init];
//        [self.navigationController pushViewController:autonym animated:YES];
//    }
    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    
    
    
    
}

- (IBAction)ButCardClick {
    NSLog(@"身份");
}

- (IBAction)ButAdviceClick {
    NSLog(@"审核");
}


#pragma 返回按钮
-(void)BackButton
{
    UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setFrame:CGRectMake(0, 0,13,20)];
    
    [button setBackgroundColor:[UIColor clearColor]];
    
    [button setImage:[UIImage imageNamed:@"navigation_back"] forState:UIControlStateNormal];
    
    [button addTarget:self action:@selector(BackClick) forControlEvents:UIControlEventTouchUpInside];
    
    UIBarButtonItem * barbutton = [[UIBarButtonItem alloc]initWithCustomView:button];
    
    self.navigationItem.leftBarButtonItem = barbutton;
    
}
#pragma 返回按钮的点击方法
-(void)BackClick
{
    if ([_LabelName.text isEqualToString:@""]) {
        
        [self.navigationController popViewControllerAnimated:YES];
        
    }else
    {
        MessageViewController * message = [[MessageViewController alloc]init];
        [self.navigationController pushViewController:message animated:NO                                                                                                                                                                                                                                                                                                                                                                                                                                                 ];
        message.StrName = _LabelName.text;
    
    }
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
